﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Movie.web
{
    public partial class CinemaList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Session["MovieId"].ToString();
                Repeater1.DataSource = BLL.CinemaBLL.GetCinema(id, DateTime.Now);
                Repeater1.DataBind();

                //GridView1.DataSource = BLL.CinemaBLL.GetCinema(id, DateTime.Now);
                //GridView1.DataBind();
            }
        }

        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            Session["CinemaId"] = e.CommandArgument.ToString();   
            string CinemaId = Session["CinemaId"].ToString();

            string id = Session["MovieId"].ToString();       
            Response.Redirect("~/RoomList.aspx?CinemaID="+CinemaId+"&MovieId="+id);        

        }

       
    }
}